function checkPhone(val) {
  //手机号正则验证
  let reg = /^1[3456789]{1}\d{9}$/;
  if (reg.test(val)) {
    return true;
  } else {
    return false;
  }
}
function getTime(time) {
  const y = time.getFullYear();
  const m =
    time.getMonth() < 9 ? `0${time.getMonth() + 1}` : time.getMonth() + 1;
  const d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate();
  const str = `${y}-${m}-${d}`;
  return str;
}
export default {
  checkPhone,
  getTime,
};
